# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Contributor: Jiri Kastner <cz172638@gmail.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
_pyname=cheroot
pkgname=py3-cheroot
pkgver=8.6.0
pkgrel=0
pkgdesc="High-performance, pure-Python HTTP server used by CherryPy"
url="https://cheroot.cherrypy.dev/"
license="BSD-3-Clause"
arch="noarch"
depends="python3 py3-more-itertools py3-six py3-jaraco.functools"
# py3-setuptools_scm is needed to set python module version
makedepends="
	py3-dateutil
	py3-pbr
	py3-portend
	py3-setuptools
	py3-setuptools_scm
	"
checkdepends="
	py3-jaraco.context
	py3-jaraco.text
	py3-openssl
	py3-pypytools
	py3-pytest
	py3-pytest-cov
	py3-pytest-mock
	py3-requests-unixsocket
	py3-requests-toolbelt
	py3-pytest-xdist
	py3-trustme
	"
subpackages="$pkgname-tests"
source="https://files.pythonhosted.org/packages/source/c/$_pyname/$_pyname-$pkgver.tar.gz
	setuptools-git.patch
	"
builddir="$srcdir/$_pyname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	python3 -m pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

tests() {
	depends="py3-cheroot"
	amove usr/lib/python*/site-packages/cheroot/test
}
sha512sums="
26e48c935fe32d4ce3cf6ae20b5b272416ca53bd8496527c2958ec2ebe87529c831f283ae900e13271b610e39531b682df0376935ecc3bcfcca11c299cd2a893  cheroot-8.6.0.tar.gz
7831aeeea0b6d1ed094c92eb697632395de903d5de170c37230db2b7d083041855473f8d50b93c1e2f630e0c411ccf5f909593b3160cb134339e9d3e21ed691c  setuptools-git.patch
"
